package com.lcq.study.hutool;

import cn.hutool.json.JSONUtil;

import java.io.File;
import java.nio.charset.Charset;

/**
 * @ClassName JSONFileRead
 * @Description
 * @Author lichuanqi
 * @Date 2023/2/7 14:31
 * @Version 1.0
 **/
public class JSONFileRead {
    public static void main(String[] args) {
        File versionFile = new File("D:/test/yuexiu/rvt/ExportDetail.json");
        if (versionFile.exists()){
            ModelExportDetailDto dto =
                    JSONUtil.readJSON(versionFile, Charset.forName("UTF-8"))
                            .toBean(ModelExportDetailDto.class);
            System.out.println(dto);
        }
    }
}
